package com.fjnu.dao;

import com.fjnu.model.User;

import java.util.List;

public interface UserDao {
    // crud  :  insert,
    public int insert(User user) ;
    public int delete(String userId) ;

    /**
     * UserDto: user data transfer object,
     *  among layers of dao, service, and controller.
     * @param userId
     * @param user
     * @return
     */
    public int update(String userId, User user) ;

    public User selectUserByNameAndPassword(String userId, String password) ;
    public List<User> selectUserByRole(String roleId) ;


}
